﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root.master" AutoEventWireup="true" CodeFile="rqdetail.aspx.cs" Inherits="rqdetail" %>

<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxFormLayout" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
    <script type="text/javascript">
        // <![CDATA[
        function ShowLoginWindow() {

            completPanel.SetVisible(true);
            //ppcMAt.Show();
        }

        function onSelChange(matCombo) {
            var text = matCombo.GetSelectedItem().GetColumnText('ED');
            txt_ed.SetText(text);
        }

        function matCombo_SelectedIndexChanged(s, e) {
            alert(s.GetSelectedItem().GetColumnText("NAME"));
            grdMat.GetEditor("ED").PerformCallback(s.GetValue());
        }
        // ]]> 
    </script>
    <br />
    <dx:ASPxLabel ID="rqNum" runat="server" Text="ASPxLabel" Font-Size="Medium" Font-Bold="True" ForeColor="#376092">
    </dx:ASPxLabel>
    <div class="form-container request-details">
        <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td class="label width-x1" style="width: 177px">Номер заявки:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lb_RqId" runat="server" Text="" CssClass="width-x3">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1" style="width: 177px">Управляющая компания:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lbl_MgmtCompanyId" runat="server" Text="" CssClass="width-x3">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1" style="width: 177px">Домоуправление:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lbl_DU" runat="server" Text="" CssClass="width-x3"></dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1" style="width: 177px">Номер в журнале ДУ:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lbl_LocalId" runat="server" Text="" CssClass="width-x3">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1" style="width: 177px">Статус:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lbl_State" runat="server" Text="" CssClass="width-x3"></dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1" style="width: 177px">Адрес:</td>
                    <td class="value width-x3">
                        <dx:ASPxLabel ID="lbl_Addr" runat="server" Text="" CssClass="width-x3"></dx:ASPxLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <hr />
        <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td class="label width-x1">Внес пользователь:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_UserIn" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Фамилия заявителя:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_RequesterName" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Дата создания:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_DateCreate" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Телефон заявителя:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_RequesterPhone" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Время поступления:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_DateIn" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Вид проблемы:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_JobType" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Срок:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_DueDate" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Локализация:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_Loc" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Выполнена:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_DateComplet" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Аварийная?</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_IsEmergency" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Закрыта:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_isClosed" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Платная?</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_IsPaid" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td class="label width-x1">Организация:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_WorkCompany" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                    <td class="label width-x1">Исполнитель:</td>
                    <td class="value width-x2">
                        <dx:ASPxLabel ID="lbl_ExecutorName" runat="server" Text="" CssClass="width-x2">
                        </dx:ASPxLabel>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <hr />
    <div id="comment_list" class="table-container rq-comment-list">
        <dx:ASPxGridView ID="grd_detail" runat="server" AutoGenerateColumns="False" DataSourceID="ds_detail" Width="100%" KeyFieldName="id" Theme="DevEx" OnHtmlDataCellPrepared="grd_detail_HtmlDataCellPrepared" OnHtmlRowPrepared="grd_detail_HtmlRowPrepared" OnCustomColumnDisplayText="grd_detail_CustomColumnDisplayText">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="Id" ReadOnly="True" VisibleIndex="0" Caption="№">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn Caption="Дата" FieldName="data" ReadOnly="True" VisibleIndex="1">
                    <PropertiesDateEdit EditFormat="DateTime" DisplayFormatString="dd.MM.yyyy HH:mm">
                    </PropertiesDateEdit>
                </dx:GridViewDataDateColumn>
                <dx:GridViewDataTextColumn FieldName="Status" ReadOnly="True" Visible="False" VisibleIndex="2">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Вид" FieldName="StatusName" ReadOnly="True" VisibleIndex="3">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="USR" ReadOnly="True" Visible="False" VisibleIndex="4">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Добавил" FieldName="USERNAME" ReadOnly="True" VisibleIndex="5">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Комментарии" FieldName="NOTE" ReadOnly="True" VisibleIndex="6">
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsBehavior AllowSort="False" />
        </dx:ASPxGridView>
    </div>
    <asp:SqlDataSource ID="ds_detail" runat="server" ConnectionString="<%$ ConnectionStrings:DispatcherWebAppConnectionString %>" SelectCommand="SELECT rg.RequestId AS Id, CONVERT (datetime, SWITCHOFFSET(CONVERT (datetimeoffset, rg.CreatedAtUtc), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS data, 1 AS Status, N'Не рассмотрена' AS StatusName, rg.CreatedBy AS USR, u.LastName + CHAR(32) + LEFT (u.FirstName, 1) + '. ' + LEFT (u.MiddleName, 1) + '.' AS USERNAME, rg.RequestBody AS NOTE FROM Rq_Request AS rg LEFT OUTER JOIN App_User AS u ON u.UserId = rg.CreatedBy WHERE (rg.RequestId = @ID) UNION ALL SELECT c.CommentId AS id, CONVERT (datetime, SWITCHOFFSET(CONVERT (datetimeoffset, c.CreatedAtUtc), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS data, c.Status, CASE WHEN c.[Status] = 1 THEN N'Не рассмотрена' WHEN c.[Status] = 2 THEN N'В процессе' WHEN c.[Status] = 3 THEN N'Выполнена' WHEN c.[Status] = 4 THEN N'Возвращена' WHEN c.[Status] = 5 THEN N'Снята' WHEN c.[Status] = 6 THEN N'Закрыта' WHEN c.[Status] = 7 THEN N'Отложена' WHEN c.[Status] = 8 THEN N'Текущий ремонт' WHEN c.[Status] = 9 THEN N'Запрос в службу эксплуатации (СЭ)' ELSE '' END AS StatusName, c.CreatedBy AS USR, u.LastName + CHAR(32) + LEFT (u.FirstName, 1) + '. ' + LEFT (u.MiddleName, 1) + '.' AS USERNAME, c.CommentBody AS NOTE FROM Rq_Comment AS c LEFT OUTER JOIN App_User AS u ON u.UserId = c.CreatedBy WHERE (c.RequestId = @ID1) AND (c.IsDeleted = 0) AND (c.IsSystem = 0)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="-1" Name="ID" QueryStringField="code" />
            <asp:QueryStringParameter DefaultValue="-1" Name="ID1" QueryStringField="code" />
        </SelectParameters>
    </asp:SqlDataSource>
    <dx:ASPxLabel ID="lbl_err" runat="server" Text="" Visible="false" ForeColor="Red" Font-Size="14pt">
    </dx:ASPxLabel>
    <dx:ASPxButton ID="btn_complete" runat="server" Text="Выполнить" AutoPostBack="False">
        <ClientSideEvents Click="function(s, e) { ShowLoginWindow(); }" />
    </dx:ASPxButton>
    <dx:ASPxPopupControl ID="ppc_MAt" runat="server" CloseAction="CloseButton" Modal="False"
        PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="ppcMAt"
        AllowDragging="True" PopupAnimationType="None" EnableViewState="False" HeaderText="Выполнение заявки" OnLoad="ppc_MAt_Load" EnableCallbackAnimation="True">

        <ContentCollection>
            <dx:PopupControlContentControl ID="PopupControl" runat="server" SupportsDisabledAttribute="True">
            </dx:PopupControlContentControl>
        </ContentCollection>

    </dx:ASPxPopupControl>
    <asp:SqlDataSource ID="ds_serviswork" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>" SelectCommand="SELECT &quot;CODE&quot;, &quot;NAME&quot;, &quot;ED&quot;, &quot;PRICE&quot; FROM &quot;SERVISWORK&quot; ORDER BY &quot;NAME&quot;"></asp:SqlDataSource>
    <dx:ASPxPanel ID="ASPxPanel1" runat="server" Height="27px" Width="498px" ClientInstanceName="completPanel" OnInit="ASPxPanel1_Init">
        <PanelCollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                <table>
                    <tr>
                        <td>

                            <dx:ASPxFormLayout ID="ASPxFormLayout1" runat="server">
                                <Items>
                                    <dx:LayoutGroup Caption="Layout Group" ColCount="2" ShowCaption="False">
                                        <Items>
                                            <dx:LayoutGroup Caption="Отетить как выполненую">
                                                <Items>
                                                    <%-- <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                                                        <LayoutItemNestedControlCollection>
                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                <dx:ASPxLabel ID="lbl_period" runat="server" Font-Bold="True" ForeColor="Red" Text="Допустимый период" Visible="False">
                                                                </dx:ASPxLabel>
                                                            </dx:LayoutItemNestedControlContainer>
                                                        </LayoutItemNestedControlCollection>
                                                    </dx:LayoutItem>--%>
                                                    <dx:LayoutGroup Caption="Layout Group" ColCount="2" ShowCaption="False">
                                                        <Items>
                                                            <dx:LayoutItem Caption="Время выполнения">
                                                                <LayoutItemNestedControlCollection>
                                                                    <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                        
                                                                                    <dx:ASPxDateEdit ID="dt1" runat="server" EditFormat="Custom" EditFormatString="dd.MM.yyyy" Width="100px">
                                                                                        <ValidationSettings>
                                                                                            <RequiredField IsRequired="True" />
                                                                                        </ValidationSettings>
                                                                                    </dx:ASPxDateEdit>


                                                                    </dx:LayoutItemNestedControlContainer>
                                                                </LayoutItemNestedControlCollection>
                                                            </dx:LayoutItem>
                                                            <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                                                                <LayoutItemNestedControlCollection>
                                                                    <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                        <dx:ASPxTimeEdit ID="tm1" runat="server" Width="80px">
                                                                        </dx:ASPxTimeEdit>
                                                                    </dx:LayoutItemNestedControlContainer>
                                                                </LayoutItemNestedControlCollection>

                                                                <CaptionSettings HorizontalAlign="Left"></CaptionSettings>
                                                            </dx:LayoutItem>
                                                        </Items>
                                                    </dx:LayoutGroup>
                                                    <dx:LayoutItem Caption="Выезд АВС:" HorizontalAlign="Left" Width="60px">
                                                        <LayoutItemNestedControlCollection>
                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True" Width="20px">
                                                                <dx:ASPxCheckBox ID="chk_ABC" runat="server" CheckState="Unchecked">
                                                                    <CheckBoxStyle HorizontalAlign="Left" />
                                                                </dx:ASPxCheckBox>
                                                            </dx:LayoutItemNestedControlContainer>
                                                        </LayoutItemNestedControlCollection>
                                                        <CaptionSettings HorizontalAlign="Left" />
                                                    </dx:LayoutItem>
                                                    <dx:LayoutGroup Caption="Работа">
                                                        <Items>
                                                            <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                                                                <LayoutItemNestedControlCollection>
                                                                    <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                        <dx:ASPxComboBox ID="cbb_work" runat="server" EnableCallbackMode="True" IncrementalFilteringMode="Contains"
                                                                            FilterMinLength="3"
                                                                            TextField="Name" ValueField="CODE" ValueType="System.Int32" Width="400px" ClientInstanceName="cbbWork" ViewStateMode="Inherit">

                                                                            <Buttons>
                                                                                <dx:EditButton Text="X">
                                                                                </dx:EditButton>
                                                                            </Buttons>
                                                                            <ClientSideEvents ButtonClick="function(s, e) { if (e.buttonIndex == 0)  cbbWork.SetValue(null); }" />
                                                                            <ValidationSettings ErrorDisplayMode="ImageWithTooltip" Display="Dynamic">
                                                                                <RequiredField IsRequired="True" />
                                                                            </ValidationSettings>
                                                                        </dx:ASPxComboBox>
                                                                    </dx:LayoutItemNestedControlContainer>
                                                                </LayoutItemNestedControlCollection>
                                                            </dx:LayoutItem>
                                                            <dx:LayoutItem Caption="Добавить название работы в коментарий" Width="100px">
                                                                <LayoutItemNestedControlCollection>
                                                                    <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                        <dx:ASPxCheckBox ID="chk_AddWork" runat="server" Checked="True" CheckState="Checked" Width="30px">
                                                                        </dx:ASPxCheckBox>
                                                                    </dx:LayoutItemNestedControlContainer>
                                                                </LayoutItemNestedControlCollection>
                                                            </dx:LayoutItem>
                                                            <dx:LayoutGroup Caption="Layout Group" ColCount="3" ShowCaption="False">
                                                                <Items>
                                                                    <dx:LayoutItem Caption="Ед. изм.">
                                                                        <LayoutItemNestedControlCollection>
                                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                                <dx:ASPxTextBox ID="txt_wed" runat="server" Width="70px">
                                                                                </dx:ASPxTextBox>
                                                                            </dx:LayoutItemNestedControlContainer>
                                                                        </LayoutItemNestedControlCollection>
                                                                    </dx:LayoutItem>
                                                                    <dx:LayoutItem Caption="Объем">
                                                                        <LayoutItemNestedControlCollection>
                                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                                <dx:ASPxSpinEdit ID="spn_col" runat="server" Height="21px" Number="0" Width="70px">
                                                                                </dx:ASPxSpinEdit>
                                                                            </dx:LayoutItemNestedControlContainer>
                                                                        </LayoutItemNestedControlCollection>
                                                                    </dx:LayoutItem>
                                                                    <dx:LayoutItem Caption="Цена">
                                                                        <LayoutItemNestedControlCollection>
                                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                                <dx:ASPxSpinEdit ID="spn_price" runat="server" Width="70px">
                                                                                    <SpinButtons ShowIncrementButtons="False">
                                                                                    </SpinButtons>
                                                                                </dx:ASPxSpinEdit>
                                                                            </dx:LayoutItemNestedControlContainer>
                                                                        </LayoutItemNestedControlCollection>
                                                                    </dx:LayoutItem>
                                                                </Items>
                                                                <SettingsItemCaptions HorizontalAlign="Right" />
                                                            </dx:LayoutGroup>
                                                            <dx:LayoutItem Caption="Коменарий" Width="100%">
                                                                <LayoutItemNestedControlCollection>
                                                                    <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                        <dx:ASPxMemo ID="mmo_Note" runat="server" Height="50px" Width="100%">
                                                                        </dx:ASPxMemo>
                                                                    </dx:LayoutItemNestedControlContainer>
                                                                </LayoutItemNestedControlCollection>
                                                                <CaptionSettings Location="Top" />
                                                            </dx:LayoutItem>
                                                        </Items>
                                                    </dx:LayoutGroup>
                                                    <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                                                        <LayoutItemNestedControlCollection>
                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                <dx:ASPxButton ID="btn_Exec" runat="server" OnClick="btn_Exec_Click" Text="Сохранить">
                                                                </dx:ASPxButton>
                                                            </dx:LayoutItemNestedControlContainer>
                                                        </LayoutItemNestedControlCollection>
                                                    </dx:LayoutItem>
                                                </Items>
                                                <SettingsItems HorizontalAlign="Left" />
                                            </dx:LayoutGroup>
                                            <dx:LayoutGroup Caption="Материалы">
                                                <Items>
                                                    <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                                                        <LayoutItemNestedControlCollection>
                                                            <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                                                <dx:ASPxGridView ID="grd_Mat" runat="server" ClientInstanceName="grdMat"
                                                                    AutoGenerateColumns="False" KeyFieldName="ID"
                                                                    OnRowDeleting="grd_Mat_RowDeleting"
                                                                    OnRowInserting="grd_Mat_RowInserting" Width="450px" OnCellEditorInitialize="grd_Mat_CellEditorInitialize">
                                                                    <Columns>
                                                                        <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
                                                                            <NewButton Visible="True">
                                                                            </NewButton>
                                                                            <DeleteButton Visible="True">
                                                                            </DeleteButton>
                                                                        </dx:GridViewCommandColumn>
                                                                        <dx:GridViewDataTextColumn Caption="№" FieldName="ID" ShowInCustomizationForm="True" VisibleIndex="1">
                                                                            <EditFormSettings Visible="False" />
                                                                        </dx:GridViewDataTextColumn>
                                                                        <dx:GridViewDataComboBoxColumn Caption="Материал" FieldName="Code" ShowInCustomizationForm="True" VisibleIndex="2">
                                                                            <PropertiesComboBox DataSourceID="ds_mat" EnableCallbackMode="True" IncrementalFilteringMode="Contains"
                                                                                ClientInstanceName="cbbMat" FilterMinLength="3"
                                                                                TextField="NAME" ValueField="CODE" ValueType="System.Int32" TextFormatString="{0}" DropDownWidth="500px">
                                                                                <Columns>
                                                                                    <dx:ListBoxColumn Caption="Материал" FieldName="NAME" Width="100%" />
                                                                                    <dx:ListBoxColumn Caption="Ед. изм" FieldName="ED" Width="0px" />
                                                                                </Columns>
                                                                                <ClientSideEvents SelectedIndexChanged="function(s, e) { onSelChange(s); }"
                                                                                    ButtonClick="function(s, e) { if (e.buttonIndex == 0) { cbbMat.SetValue(null); txt_ed.SetValue(null); } }" />
                                                                                <Buttons>
                                                                                    <dx:EditButton Text="X">
                                                                                    </dx:EditButton>
                                                                                </Buttons>
                                                                                <ValidationSettings>
                                                                                    <RequiredField IsRequired="True" />
                                                                                </ValidationSettings>
                                                                            </PropertiesComboBox>
                                                                        </dx:GridViewDataComboBoxColumn>
                                                                        <dx:GridViewDataSpinEditColumn Caption="Кол-во" FieldName="Quantity" ShowInCustomizationForm="True" VisibleIndex="3">
                                                                            <PropertiesSpinEdit DisplayFormatString="g" Width="100px">
                                                                            </PropertiesSpinEdit>
                                                                        </dx:GridViewDataSpinEditColumn>
                                                                        <dx:GridViewDataTextColumn Caption="Ед. изм." FieldName="Ed" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="5">
                                                                            <PropertiesTextEdit ClientInstanceName="txt_ed" Width="100px">
                                                                            </PropertiesTextEdit>
                                                                        </dx:GridViewDataTextColumn>
                                                                        <dx:GridViewDataSpinEditColumn Caption="Цена" FieldName="Price" ShowInCustomizationForm="True" VisibleIndex="4">
                                                                            <PropertiesSpinEdit DisplayFormatString="g" Width="100px">
                                                                            </PropertiesSpinEdit>
                                                                        </dx:GridViewDataSpinEditColumn>
                                                                    </Columns>
                                                                    <SettingsEditing EditFormColumnCount="1" />
                                                                </dx:ASPxGridView>
                                                            </dx:LayoutItemNestedControlContainer>
                                                        </LayoutItemNestedControlCollection>
                                                    </dx:LayoutItem>
                                                </Items>
                                            </dx:LayoutGroup>
                                        </Items>
                                    </dx:LayoutGroup>
                                </Items>
                            </dx:ASPxFormLayout>

                        </td>
                    </tr>
                </table>
            </dx:PanelContent>
        </PanelCollection>
    </dx:ASPxPanel>
    <asp:SqlDataSource runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>" EnableCaching="True" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>" SelectCommand="SELECT CODE, FULLNAME NAME, ED, PRICE FROM CLASSMAT WHERE ISGROUP=0
"
        ID="ds_mat"></asp:SqlDataSource>
    <asp:EntityDataSource runat="server" DefaultContainerName="Entities" ConnectionString="name=Entities" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="WORKSPECLIST" ID="ds_WORKSPECLIST">
    </asp:EntityDataSource>
</asp:Content>

